<?php

namespace app\api\controller\Product;

use think\Controller;

class Type extends Controller
{
    public function __construct()
    {
        parent::__construct();

        $this->TypeModel = model('Product.Type');
    }

    public function list()
    {
        if($this->request->isPost())
        {
            $TypeList = $this->TypeModel->with(['product'])->order('weigh','desc')->select();

            $data = [
                'TypeList' => $TypeList
            ];

            $this->success('返回分类数据',null,$data);
        }
    }
}
